var app = getApp()
function request(url, type, data = {}, callback) {
  wx.request({
    url,
    method: type,
    header: {
      "X-Nideshop": app.globalData.token
    },
    data,
    success: function (res) {
      callback(res)
    }
  })
}

module.exports = {
  request
}